home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / tabdlg2.zip / SRC / COMMON.H next >
Text File  |  1994-05-15  |  2KB  |  65 lines

  1. /*
  2. ** TabDlg DLL
  3. ** Copyright (c) 1994 Edward McCreary.
  4. ** All rights reserved.
  5. **
  6. ** Redistribution and use in source and binary forms are freely permitted
  7. ** provided that the above copyright notice and attibution and date of work
  8. ** and this paragraph are duplicated in all such forms.
  9. ** THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
  10. ** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  11. ** WARRANTIES OF MERCHANTIBILILTY AND FITNESS FOR A PARTICULAR PURPOSE.
  12. */
  13.  
  14. /* one control in a tab */
  15. typedef struct tagTabCtl
  16. {
  17.  WORD   wID;
  18.  struct tagTabCtl   *next;
  19. } TAB_CTL;
  20.  
  21. /* one tab with list of controls */
  22. typedef struct tagTabEntry
  23. {
  24.  char       *name;
  25.  int        nTabID;
  26.  TAB_CTL    *controls;
  27.  
  28.  struct tagTabEntry *next;
  29. } TAB_ENTRY;
  30.  
  31. /* store info for one frame control */
  32. typedef struct tagFrame
  33. {
  34.  HWND       hWnd;       /* window handle of frame */
  35.  HWND       hDlg;       /* dialog handle */
  36.  WNDPROC    OldWndProc; /* original windows proc */
  37.  WNDPROC    OldDlgProc; /* original dialog proc */
  38.  TAB_ENTRY  *tab_list;  /* list of tabs */
  39.  int        nTopTab;    /* id of top tab */
  40.  int        nNextTab;   /* id of next tab to be created */
  41.  BOOL       bUseShadow; /* put a shadow under tab title */
  42. } FRAME_ENTRY;
  43.  
  44. #define MAX_ENTRY   32  /* maximum number of frames allowed to be registered */
  45.  
  46. LONG WINAPI __export FrameWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
  47. LONG WINAPI __export DlgWndProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  48. void __export RegisterLibrary(void);
  49. void __export UnRegisterFrame(HWND hWnd);
  50. void __export UnRegisterLibrary(void);
  51. void UpdateTabs(HWND hDlg);
  52. void __export PaintFrame(FRAME_ENTRY *pFrame);
  53. void __export PaintTabs(FRAME_ENTRY *pFrame,HDC hdc,LPRECT lprc);
  54. void __export PaintDownTab(HDC hdc, LPRECT lprc);
  55. void __export PaintUpTab(HDC hdc, LPRECT lprc);
  56. void FreeTab(TAB_ENTRY *pTab);
  57. FRAME_ENTRY __export *GetFrameEntry(HWND hDlg);
  58. TAB_ENTRY __export *GetTabEntry(FRAME_ENTRY *pFrame,int nTabID);
  59. int TabHit(HWND hDlg,WORD x, WORD y);
  60. int GetTabWidth(FRAME_ENTRY *pFrame);
  61. void DrawTabText(HDC hdc,LPRECT lprc,LPCSTR text,BOOL bTop, BOOL bShadow);
  62. int __export GetLastTab(FRAME_ENTRY *pFrame);
  63. BOOL WINAPI CreateSingleTab(HWND hDlg,HINSTANCE hInst, UINT wFrameID, 
  64.     TAGTEMPLATE FAR *lpTemplate);
  65. BOOL WINAPI __export AddControl(TAB_ENTRY *pTab, WORD wControlID);